<!-- <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -->
<%@ page contentType="text/html; charset=UTF-8" 
	import="javax.servlet.*"
	import="javax.servlet.http.*" 
	import="java.io.*" 
	import="java.util.*"
	import="edu.indiana.d2i.vmm.vm.*"
	import="edu.indiana.d2i.vmm.job.*"
%>
<%
	/* HTRCJobTracker tracker = (HTRCJobTracker) application.getAttribute("htrcjobtracker");
	List<VMStatus> vmstatus = tracker.getVMPoolStatus();
	List<HTRCJobInProgress> waitingjobs = tracker.getWaitingJobs();
	List<HTRCJobInProgress> runningjobs = tracker.getRunningJobs();
	List<HTRCJobInProgress> completedjobs = tracker.getCompletedJobs(); */
%>
<%!
	/* public void generateVMStatusTable(JspWriter out, List<VMStatus> vmstatus) throws IOException {
		out.print("<table border=\"1\" cellpadding=\"5\" cellspacing=\"0\">\n"+
		              "<tr><th>Public IP</th><th>Private IP</th>" + 
		              "<th>Status</th>" + "</tr>\n");
		for (VMStatus status : vmstatus) {
			out.print("<tr><td>" + status.vminfo.publicIP + 
					  "</td><td>" + status.vminfo.privateIP + 
					  "</td><td>" + status.status + "</td></tr>\n");
		}
		out.print("</table>\n");
	}

	public void generateJobsStatusTable(JspWriter out, List<HTRCJobInProgress> jobs) throws IOException {
		out.print("<table border=\"1\" cellpadding=\"5\" cellspacing=\"0\">\n"+
	              "<tr><th>Job ID</th><th>Status</th>" + "</tr>\n");
		for (HTRCJobInProgress job : jobs) {
			out.print("<tr><td>" + "<a href=\"htrcjobdetails.jsp?jobid=" + job.jobStatus.jobID + "\">" + job.jobStatus.jobID + "</a>" + 
					  "</td><td>" + job.jobStatus.status + "</td></tr>\n");
		}
		out.print("</table>\n");
	} */
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>VM Cluster Administration</title>
</head>
<body>

<hr>
<h2>VM Pool Status Summary</h2>
<%  //generateVMStatusTable(out, vmstatus); %>
	<!-- Hello! The time is now<%= new java.util.Date() %> -->
<hr>
<h2>Waiting Jobs</h2>
<%  //generateJobsStatusTable(out, waitingjobs); %>
<hr>
<h2>Running Jobs</h2>
<%  //generateJobsStatusTable(out, runningjobs); %>
<hr>
<h2>Completed Jobs</h2>
<%  //generateJobsStatusTable(out, completedjobs); %>
<hr>
</body>
</html>